﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jzy;

namespace ECommerce.Model.MemberContact
{
    public partial class ECMemberContactInfo : EntityBase
    {
        private const string TABLE_NAME = "ECMemberContact";
        private const string INSERT_SQL = "insert into ECMemberContact ( [ID], [MemberID], [Name], [Telephone], [Address], [MemorialDay], [TypeID]) values ( @ID, @MemberID, @Name, @Telephone, @Address, @MemorialDay, @TypeID)";
        private const string UPDATE_SQL = "update ECMemberContact set  [ID] = @ID, [MemberID] = @MemberID, [Name] = @Name, [Telephone] = @Telephone, [Address] = @Address, [MemorialDay] = @MemorialDay, [TypeID] = @TypeID where ID = @ID";
        /// <summary>
        /// 
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 会员ID
        /// </summary>
        public Int32 MemberID
        {
            get;
            set;
        }
        /// <summary>
        /// 姓名
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 联系电话
        /// </summary>
        public String Telephone
        {
            get;
            set;
        }
        /// <summary>
        /// 地址
        /// </summary>
        public String Address
        {
            get;
            set;
        }
        /// <summary>
        /// 纪念日
        /// </summary>
        public DateTime MemorialDay
        {
            get;
            set;
        }
        /// <summary>
        /// 类型
        /// </summary>
        public Int32 TypeID
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "memberid":
                    this.MemberID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "telephone":
                    this.Telephone = (String)value;
                    break;
                case "address":
                    this.Address = (String)value;
                    break;
                case "memorialday":
                    this.MemorialDay = (DateTime)value;
                    break;
                case "typeid":
                    this.TypeID = (Int32)value;
                    break;
            }
        }
    }


}
